package com.AnnotionPrint.Myprintmachine;

import com.AnnotionPrint.IBox.MyBox;
import com.AnnotionPrint.Iparper.Mypaper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author cc
 * @date 2021/8/12 11:21
 * @Description
 */
@Component("Printpaper")
public class PrintPaper {

    @Value("${printer.price}")
    private int price;

    @Value("${printer.brand}")
    private String name;

    @Resource(name = "${printer.box}")
    private MyBox myBox;

    @Resource(name = "${printer.paper}")
    private Mypaper mypaper;

    public void show(){
        System.out.println("打印机开始工作...");
        System.out.println("打印机价格是:"+price);
        System.out.println("打印机品牌是:"+name);
        System.out.println("打印机纸张:"+mypaper.showParper());
        System.out.println("打印机的墨水:"+myBox.showBox());
    }

}
